package threads;

public class TaskThreadDemo {

    // 都不理解
    public static void main(String[] args) {
        // Create tasks 创建需要跑在线程上的任务
        Runnable printA = new PrintChar('a', 100);
        Runnable printB = new PrintChar('b', 100);
        Runnable print100 = new PrintNum(100);

        // Create threads 创建线程，将任务绑定到线程上
        Thread thread1 = new Thread(printA);
        Thread thread2 = new Thread(printB);
        Thread thread3 = new Thread(print100);

        thread1.start();
        thread2.start();
        thread3.start();
    }
}
